package com.eystar.pdc.util;

import cn.hutool.crypto.digest.DigestUtil;

public class LoginUtil {
	/**
	 * 成功标识
	 */
	public static final short SUCCESS = 1;
	/**
	 * 失败标识
	 */
	public static final short FAILURE = 0;
	
	/**
	 * 登录密码错误
	 */
	public static final short LOGIN_USER_PASS_ERROR = 10;
	/**
	 * 登录用户被锁定
	 */
	public static final short LOGIN_USER_LOCK_ERROR = 20;
	/**
	 * 登录验证码错误
	 */
	public static final short LOGIN_VERIFICATION_ERROR = 30;
	/**
	 * 用户已经失效
	 */
	public static final short LOGIN_USER_INVALID_ERROR = 40;
	/**
	 * Session中当前用户
	 */
	public static final String SESSION_CURRENT_USER = "currentUser";
	
	/**
	 * 超级管理员
	 */
	public static final short ROLE_SUPER = 1;
	/**
	 * 一般的管理用户
	 */
	public static final short ROLE_ADMIN = 10;
	/**
	 * 一般的普通用户
	 */
	public static final short ROLE_NORMAL = 20;
	/**
	 * 菜单标识名称
	 */
	public static final String MENU_REMARK_NAME = "menu";
	/**
	 * 菜单标识名称
	 */
	public static final String MENU_RES_NAME = "res";
	/**
	 * 隐藏状态
	 */
	public static final short HIDDEN_STATUS = 20;
	/**
	 * 显示状态
	 */
	public static final short DISPLAY_STATUS = 10;

	public static String getSaltPassword(String password,String salt){
		return DigestUtil.md5Hex(password + salt + "9527");
	}
	
	public static void main(String[] args) {
		System.out.println(getSaltPassword("admin", "1234567"));
	}
}
